package com.example.reactor.rsocket.config;

import org.springframework.messaging.rsocket.service.RSocketExchange;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

/**
 * @author zpMeng
 * @since 10/11/2024
 */
public interface MessageClient {

    @RSocketExchange("normalRequestAndNormalResponse")
    String normalRequestAndNormalResponse(String request);

    @RSocketExchange("requestAndResponseStream")
    Flux<String> requestAndResponseStream(String user);

    @RSocketExchange("fireAndForget")
    Mono<Void> fireAndForget(Mono<String> request);

    @RSocketExchange("monoRequestAndMonoResponse")
    Mono<String> monoRequestAndMonoResponse(Mono<String> request);

    @RSocketExchange("fluxRequestAndFluxResponse")
    Flux<String> fluxRequestAndFluxResponse(Flux<String> request);

    @RSocketExchange("multiParam")
    Mono<String> multiParam(String normal, Mono<String> request);
}
